
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
-- =============================================
-- Author:		Jonas
-- Create date: 22-01-2013
-- Description:	Retorna todos os eventos
-- =============================================
CREATE PROCEDURE [ext].[listarEventos] 
	
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT e.id_evento, e.descricao as Evento,
		   e.data_inicio as Data, u.UserName , e.cancelado
		   
	  FROM ext.evento e
	  inner join dbo.aspnet_Users u 
	  on e.id_utilizador = u.UserId 
END
GO
